const soundAction = [
  {
    id: 'soundServer.changeSounds',
    name: '切换音效(上一个/下一个)',
    type: 'sound',
    exec: (app, param) => {
      let soundParam = 0
      ;(param.key == 'alt+m+left' || param.key == 'alt+m+up') && (soundParam = -1)
      ;(param.key == 'alt+m+right' || param.key == 'alt+m+down') && (soundParam = 1)
      app.soundServer.changeSounds(soundParam)
    }
  },
  {
    id: 'soundServer.changeIsSoundOpen',
    name: '开启/关闭音效',
    type: 'sound',
    exec: (app, param) => {
      if((param[0]=='打开'||param[0]=='开启')&&(app.soundServer.isSoundOpen==true)){
        return
      }
      if(param[0]=='关闭'&&app.soundServer.isSoundOpen==false){
        return
      }
      app.soundServer.changeIsSoundOpen()
    }
  },
  {
    id: 'soundServer.changeVolume',
    name: '调节音量',
    type: 'sound',
    exec: (app, param) => {
      app.soundServer.changeVolume((param / 100).toFixed(2) - 0)
    }
  },
  {
    id: 'soundServer.isSoundOpen',
    name: '音效开关',
    type: 'sound',
    exec: (app, param) => {
      app.soundServer.isSoundOpen = param
    }
  },
  {
    id: 'soundServer.soundsType',
    name: '音效类型',
    type: 'sound',
    exec: (app, param) => {
      app.soundServer.soundsType = param
    }
  }
]
export default soundAction
